package com.guigu.yh.springcloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;

//激活服务降级、熔断、限流组件 hystrix ，注意：@EnableHystrix涵盖了@EnableCircuitBreaker
@EnableHystrix
// 使用feign的时候缺少这个注释会启动报错:XXXService 找不到 bean
@EnableFeignClients
//当前服务是client, 需要注册到EurekaServer
@EnableEurekaClient
@SpringBootApplication
public class OrderMain80_FeignHystrix {
    public static void main(String[] args) {
        SpringApplication.run(OrderMain80_FeignHystrix.class, args);
    }
}
